package cn.com.connected.base.exception;

/**
 * 作者:   邵明生
 * 时间:   2018/11/6 9:23
 * 描述:   项目状态码
 */
public enum ErrorCode {
    //所有非000_打头的，都要统一拦截，发送到钉钉，及时处理

    //999打头的都是用户通过token，非法尝试获取非法数据
    SERIOUS_REQUEST("999_001","非法的请求尝试"),
    LOGIN_TICKET_ERROR("999_001","违法口令"),
    LOGIN_NO_TICKET("999_001","请先登录"),
    LOGIN_TIMEOUT("999_001","请先登录"),
    LOGIN_OTHER_ADDRESS("999_001","在其他地方登录"),

    LOGIN_PASSWORD_ERROR("000_011","用户名或密码错误"),

    //自定义提醒
    WARING("777_001",""),

    SERVICE_ERROR("998_000","第三方服务异常"),
    CAPTCHA_ERROR("998_001","人机验证异常"),
    SERVICE_SMS_ERROR("997_001","短信第三方服务异常"),
    SERVICE_OSS_ERROR("996_001","oss上传失败"),
    CONTENT_ERROR("996_002","内容含有违法违规内容"),

    SYSTEM_SUCCESS("000_001","成功"),
    SYSTEM_FAIL("000_002","系统异常"),
    PARAM_INVALID("000_005","参数异常"),
    NO_PERMISSION_API("000_007","权限不足"),
    METHOD_INVALID("000_0055","请求方式方法错误"),

    DATA_USER_ERROR_ALOT("000_008","用户异常"),
    DATA_USER_ERROR_EMPTY("000_009","用户不存在"),
    DATA_USER_EXITS("000_010","用户已存在"),

    FILE_IS_NOT_EXITS("000_014","文件不存在"),
    FILE_UPLOAD_ERROR("000_015","上传异常"),
    FILE_UPLOAD_BIG_ERROR("000_016","文件过大"),

    SMS_EMPTY("000_019","请发送验证码"),
    SMS_ERROR("000_020","验证码错误"),


    IMAGE_CODE_EMPTY("000_030","请输入图片验证码"),
    IMAGE_CODE_ERROR("000_031","图片验证码错误"),

    NO_SCHOOL("000_100","您还未绑定学校"),
    WECHART_ERROR("000_200","授权异常"),

    ;

    private String code;

    private String msg;

    ErrorCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
